package main
import "fmt"

type  HuMan struct {
    name string
    age int
    phone string
}

type Student struct {
    HuMan
    school string
    loan float32
}

type Employee struct {
    HuMan
    company string
    money float32
}

type Men interface {
    SayHi()
    Sing()
}
func (h *HuMan) SayHi(){
    fmt.Printf("Hi, i am %s  You can call me on %s \n",h.name,h.phone)
}
func (student *Student) SayHi(){
    fmt.Printf("I am %s , I am in %s school ,my phone is %s \n",student.name,student.school,student.phone)
}

func (h *HuMan) Sing(){
    fmt.Printf("Sing something %s ------- %d \n",h.name,h.age)
}

func main() {
    m := HuMan{"wanglei", 12, "1899992"}
    m.SayHi()
    wang:=Student{HuMan{"ww",20,"123441"},"xiangcheng",22}
    wang.SayHi()
    wang.Sing()

    var i Men
    i = &m
    i.Sing()


}
